{% extends "base.html" %}

{% block title %}Posts for tag '{{ tag|escape }}'. {% endblock title %}
{% block head_title %}Posts for tag '{{ tag|escape }}'. {% endblock head_title %}


{% block subnav_description %}
  <h1>wtf is this?</h1>
  <p>Tags are handy little things, otherwise known as labels or categories, which allow one to categorize the crap out of such mundane things as blog posts, bookmarks, and dead bodies. Currently, you are viewing a listing of posts related to the tag '{{ tag|escape }}'. </p>
{% endblock subnav_description %}

{% block sidebar %}
  {% include "blog/sidebar.html" %}
{% endblock sidebar %}

{% block content %}
  {% load tagging_tags %}

  {% for post in object_list  %}
    {% spaceless %}
    {% tags_for_object post as post_tags %}
    <a href="{{ post.get_absolute_url }}">{{ post.title }}</a> 
    <br/>
    {% if object.enclosure %}<a href="{{ object.get_enclosure_url }}">Download Podcast</a> {% endif %}

    <div class="post_truncated"> {{ post.body|safe|truncatewords:80 }}
      <p>Posted on {{ post.pub_date|date:"F j, Y" }}</b> <a href="{{ post.get_absolute_url }}#comments" class='commentlink'>{{ comment_count }} Comment{{ comment_count|pluralize }}</a><br />Tags: {% for post_tag in post_tags %}{% if not forloop.first %}, {% endif %}<a href="/b/tags/{{ post_tag }}/">{{ post_tag }}</a>{% endfor %}</p></div>
  {% endspaceless %}
  {% endfor %}
{% endblock content %}
